<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'home.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
     <style type="text/css">
  .div1
  {width: 1000px;
  height: 650px;
  margin: auto;
  margin-top:150px;
  background-color: rgba(94,94,94,0.8);
  border-radius:15px;
  padding-top: 40px;
  }
  </style>
  <body>
  <%
  	String message = (String)request.getAttribute("message");
  	if(message == null)
  	{
  	message = "";}
   %>
   <span id="sp1"><%=message %></span>
  <div align="center" class="div1">
  <h1>用户信息表</h1>
  	<table border="1px" cellpadding="0" cellspacing="0" width="750">
  		<tr>
  			<th>用户编号</th>
  			<th>用户名</th>
  			<th>密码</th>
  			<th>年龄</th>
  			<th>操作</th>
  		</tr>
  		<c:forEach items="${ulist}" var="users">
  			<tr>
  				<td>${users.id }</td>
  				<td>${users.uname}</td>
  				<td>${users.upassword }</td>
  				<td>${users.age }</td>
  				
  				<td><a href="jsp/update.jsp?id=${users.id }&uname=${users.uname }&pwd=${users.upassword }&age=${users.age }">修改</a>   <a href="delete?id=${users.id }">删除</a></td>
  			</tr>
  		</c:forEach>
  	</table>
  	</div>
  </body>
</html>
